[PATCH] ppc64: fix struct stat
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 25 Apr 2015 12:16:16 +0000 (14:16 +0200)
committerBen Hutchings <benh@debian.org>
Mon, 28 Jun 2021 14:24:37 +0000 (15:24 +0100)
commit4133612979cde3793deb7433bd0c462ab23320b9
treec628bf74b19610ca31eef27f49359486627055e3
parentcbf6dc98f1ed87691eb894a5c3dee2e7fcf6ab9c
[PATCH] ppc64: fix struct stat

Bug-Debian: https://bugs.debian.org/783292
Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003881.html

On ppc64 the struct stat defined by klibc matches the kernel one.
However it contains implicit padding before the st_rdev field due to the
64-bit alignement. For internal reasons, klibc defines st_rdev as a pair
of 32-bit values (using the __stdev64 macro). They only need to be
32-bit aligned and as a consequence st->st_rdev is incorrectly defined.

The solution is to add an explicit padding in the structure. This fixes
the resume binary on ppc64 BE and LE, and probably other things.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Gbp-Pq: Name klibc-ppc64-fix-struct-stat.patch
usr/include/arch/ppc64/klibc/archstat.h